<template>
	<view>
		<view class="navBarBox">
			<view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view>
			<view class="navBar">
				<view class="goback">
					<view @click="goBack" class="goicon" style="background:url(../../../static/goback.png);background-size:contain;background-repeat: no-repeat;">
					</view>
				</view>
				<view class="title">绑定老师</view>
				<view class="right">
				</view>
			</view>
		</view>
		<view class="black-strip"></view>
		<view class="region1">
			<view class="">老师信息</view>
			<view class="information">
				<view class="na">学校名称</view>
				<view class="val">{{techerData.organName}}</view>
			</view>
			<view class="information">
				<view class="na">姓名</view>
				<view class="val">{{techerData.teacherName}}</view>
			</view>
			<view class="information">
				<view class="na">性别</view>
				<view class="val" v-if="techerData.teacherSex==0">男</view>
				<view class="val" v-else="techerData.teacherSex==1">女</view>
			</view>
			<view class="information">
				<view class="na">联系电话</view>
				<view class="val">{{techerData.mobile}}</view>
			</view>
			<view class="information">
				<view class="na">学历</view>
				<view class="val">{{techerData.eduBackground}}</view>
			</view>
			<view class="information">
				<view class="na">职称</view>
				<view class="val">{{techerData.position}}</view>
			</view>
		</view>
		<button  class="ok" hover-class="button-hover" @click="go">确认绑定</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// "schoolName": '吉泰小学',
				// "name": '周大花',
				// "sex": '男',
				// "tel": 17716471436,
				// "education": '硕士',
				// "title": '高级教师',
				// 状态栏高度
				statusBarHeight: 0,
				// 导航栏高度
				navBarHeight: 82 + 11,
				techerData:null,
			}
		},
		//第一次加载时调用
		created() {
			//获取手机状态栏高度
			this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight'];
			this.techerData=uni.getStorageSync('techerData')
			console.log(this.techerData.isHeader)
			// console.log(this.techerData)
		},
		methods: {
			//绑定老师登录跳转
			go(){
				if(this.techerData.isHeader==1){
					uni.navigateTo({
						url: '../../classTeacher'
					});
				}
				else{
					uni.navigateTo({
						url: '../../teacher'
					});
				}
			},
			goBack() {
				// 此处是写返回页面的方法、
				uni.navigateBack({
					delta: 1 //返回只上一级页面
				});
			}
			
		}
	}
</script>

<style scoped>
	.navBarBox .navBar {
		padding: 3rpx 50rpx;
		padding-bottom: 8rpx;
		display: flex;
		justify-content: space-between;

		line-height: 93rpx;
		font-size: 40rpx;
	}
	.black-strip {
		height: 20rpx;
		background-color: #fafafa;
	}
	.goback {
		flex: 1;
		height: 100%;
	}

	.goicon {
		width: 30rpx;
		height: 30rpx;
		background-color: #00BEA9;
		margin-top: 30rpx;
	}

	.title {
		flex: 1;
		height: 100%;

	}

	.right {
		flex: 1;
	}

	.region1 {
		margin-top: 60rpx;
		margin-left: 24rpx;
		/* background-color: #fff; */
	}

	.information {
		margin-top: 74rpx;
		margin-left: 74rpx;
	}

	.na {
		width: 210rpx;
		color: #C8C7CC;
		float: left;
	}

	.ok {
		margin-top: 80rpx;
		margin-bottom: 50rpx;
		width: 230rpx;
		height: 70rpx;
		line-height: 70rpx;
		font-size: 30rpx;
		color: #fff;
		background-color: #2FB3FE;
	}

	.button-hover {
		color: #fff;
		background-color: #118ace;
	}
</style>
